home *** CD-ROM | disk | FTP | other *** search
/ Halting the Hacker - A P…uide to Computer Security / Halting the Hacker - A Practical Guide to Computer Security.iso / rfc / rfc1043.txt < prev    next >
Text File  |  1997-04-01  |  58KB  |  1,454 lines

  1. Network Working Group                                          A. Yasuda
  2. Request for Comments: 1043                                   T. Thompson
  3.                                              Defense Intelligence Agency
  4. Updates: RFC 732                                           February 1988
  5.  
  6.  
  7.                    TELNET Data Entry Terminal Option
  8.                          DODIIS Implementation
  9.  
  10. Status of this Memo
  11.  
  12.    This RFC suggests a proposed protocol on the TELNET Data Entry
  13.    Terminal (DET) Option - DODIIS Implementation for the Internet
  14.    community.  It is intended that this specification be compatible with
  15.    the specification of DET Option in RFC-732.  Discussion and
  16.    suggestions for improvements are encouraged.  Distribution of this
  17.    memo is unlimited.
  18.  
  19. Introduction
  20.  
  21.    In the early 1980s, the Defense Intelligence Agency (DIA) undertook
  22.    the tasks of developing a TELNET capability to access full screen
  23.    applications across a packet switching network.  This effort was
  24.    successful by implementing Data Entry Terminal (DET) options within
  25.    the TELNET protocol based on RFC 732.  These DET options have been
  26.    implemented on IAS, MVS, OS86 and UNIX operating systems.  DET
  27.    options are being developed for VM and VMS operating systems.
  28.  
  29.    The Department of Defense Intelligence Information System (DODIIS) is
  30.    a confederation of heterogeneous computer systems and remote
  31.    terminals utilizing the Defense Data Network (DDN) as the
  32.    communications backbone (namely the SCINET/DSNET-3).
  33.  
  34.    Although the reason for implementing a DET option specification was
  35.    based upon data base application interfaces, the use of a full screen
  36.    TELNET provides a method to achieve higher efficiency on the network.
  37.    Most terminal to host applications on the ARPANET are character echo
  38.    TELNETs.  This is both costly in time and network utilization, since
  39.    one character pressed on the keyboard generates a datagram composed
  40.    of TCP/IP headers plus the character sent to the host and the host
  41.    echoes back a similar datagram.  In the DODIIS community, programmers
  42.    are highly encouraged to implement full screen applications; line at
  43.    a time is acceptable; and character remote echo mode is discouraged.
  44.  
  45.    This RFC in its final form will be implemented on SCINET.  During the
  46.    interim period, the "DODIIS TELNET Network Virtual Data Entry
  47.    Terminal (NVDET) Option Specification", DIA, April 1983, will be
  48.    implemented.
  49.  
  50.  
  51.  
  52. Yasuda & Thompson                                               [Page 1]
  53.  
  54. RFC 1043              Data Entry Terminal - DODIIS         February 1988
  55.  
  56.  
  57.                              TABLE OF CONTENTS
  58.                                                                 Page No.
  59.                                                                 --------
  60.  
  61.    SECTION 1   COMMAND NAME AND OPTION CODE                          4
  62.  
  63.    SECTION 2   COMMAND MEANINGS                                      4
  64.                  Facilities Subcommands                              4
  65.                  Edit Subcommands                                    8
  66.                  Transmit Subcommands                                8
  67.                  Erase Subcommands                                  10
  68.                  Format Subcommands                                 10
  69.                  Miscellaneous Subcommands                          13
  70.  
  71.    SECTION 3   DEFAULT AND MINIMAL IMPLEMENTATION                   15
  72.  
  73.    SECTION 4   MOTIVATION FOR THE OPTION                            17
  74.  
  75.    SECTION 5   DESCRIPTION AND IMPLEMENTATION RULES                 17
  76.                  The DODIIS DET Model                               17
  77.                  Negotiating the DET Option                         18
  78.                  DET Facilities Negotiation                         18
  79.                  General DET Interaction                            19
  80.                  Form Construction                                  20
  81.                  Form response                                      21
  82.                  Function Keys                                      22
  83.                  Field Selection                                    22
  84.                  Out-Of-Context Data                                23
  85.                  Line Discipline                                    23
  86.                  Standard TELNET Control Functions                  24
  87.                  Other Implementation Notes                         24
  88.  
  89.    APPENDIX 1  DET OPCODES AND SUBCOMMAND SYNTAX                    25
  90.  
  91.    APPENDIX 2  DET ERROR CODES                                      26
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108. Yasuda & Thompson                                               [Page 2]
  109.  
  110. RFC 1043              Data Entry Terminal - DODIIS         February 1988
  111.  
  112.  
  113.    The convention in the documentation of the TELNET NVDET Protocol is
  114.    to express numbers in decimal.  Data fields are described left to
  115.    right, with the most significant octet on the left and the least
  116.    significant octet on the right.
  117.  
  118.    The order of transmission of the data described in this document is
  119.    resolved to the octet level.  Whenever a diagram shows a group of
  120.    octets, the order of transmission of those octets is the normal order
  121.    in which they are read in English.  For example, in the following
  122.    diagram the octets are transmitted in the order they are numbered.
  123.  
  124.        0                   1                   2                   3
  125.        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  126.       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  127.       |       1       |       2       |       3       |       4       |
  128.       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  129.       |       5       |       6       |       7       |       8       |
  130.       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  131.       |       9       |      10       |      11       |      12       |
  132.       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  133.  
  134.                         Transmission Order of Bytes
  135.  
  136.    Whenever an octet represents a numeric quantity, the left most bit in
  137.    the diagram is the high order or most significant bit.  That is, the
  138.    bit labeled 0 is the most significant bit.  For example, the
  139.    following diagram represents the value 170 (decimal).
  140.  
  141.                               0 1 2 3 4 5 6 7
  142.                              +-+-+-+-+-+-+-+-+
  143.                              |1 0 1 0 1 0 1 0|
  144.                              +-+-+-+-+-+-+-+-+
  145.  
  146.                            Significance of Bits
  147.  
  148.    Similarly, whenever a multi-octet field represents a numeric
  149.    quantity, the left most bit of the whole field is the most
  150.    significant bit.  When a multi-octet quantity is transmitted the most
  151.    significant octet is transmitted first.
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164. Yasuda & Thompson                                               [Page 3]
  165.  
  166. RFC 1043              Data Entry Terminal - DODIIS         February 1988
  167.  
  168.  
  169.    1. Command Name and Option Code
  170.  
  171.       DET         20
  172.  
  173.    2. Command Meanings
  174.  
  175.       IAC WILL DET
  176.  
  177.          The sender of this command REQUESTS permission to begin, or
  178.          AGREES that it will begin, sending and receiving Data Entry
  179.          Terminal (DET) subcommands to control session interactions.
  180.  
  181.       IAC WONT DET
  182.  
  183.          If the connection is already operating in DET mode, the sender
  184.          of this command DEMANDS that the connection stop operating in
  185.          DET mode and begin operating in TELNET NVT mode.  If the
  186.          connection is not operating in DET mode, the sender REFUSES to
  187.          begin operating in DET mode.  A connection is operating in
  188.          TELNET NVT mode when both parties are interpreting data as
  189.          described by the TELNET SPECIFICATION, MIL-STD-1782.
  190.  
  191.       IAC DO DET
  192.  
  193.          The sender of this command REQUESTS permission to begin, or
  194.          AGREES that it will begin, sending and receiving Data Entry
  195.          Terminal (DET) subcommands to control session interactions.
  196.  
  197.       IAC DONT DET
  198.  
  199.          If the connection is already operating in DET mode, the sender
  200.          of this command DEMANDS that the connection stop operating in
  201.          DET mode and begin operating in TELNET NVT mode.  If the
  202.          connection is not operating in DET mode, the sender REFUSES  to
  203.          begin  operating in DET mode.    A connection is operating in
  204.          TELNET NVT mode when both parties are interpreting data as
  205.          described by the TELNET SPECIFICATION, MIL-STD-1782.
  206.  
  207.       DODIIS implementations of the DET option use the subcommands
  208.       described in the remainder of Section 2.  A description of the
  209.       DODIIS DET model and DET subcommand usage is contained in Section
  210.       5.
  211.  
  212.    FACILITIES SUBCOMMANDS.  Facilities subcommands are used to negotiate
  213.    DET facilities (subcommands and attributes).  The facility
  214.    subcommands indicate the DET facilities the sender supports.
  215.    Facility negotiation may be viewed as the terminal indicating the
  216.    facilities it provides and the application indicating the facilities
  217.  
  218.  
  219.  
  220. Yasuda & Thompson                                               [Page 4]
  221.  
  222. RFC 1043              Data Entry Terminal - DODIIS         February 1988
  223.  
  224.  
  225.    it desires.  The bits of the facility maps are numbered from the
  226.    right starting at zero.  Thus, if bit 2 is set, the field will have a
  227.    decimal value of 4.
  228.  
  229.       IAC SB DET EDIT-FACILITIES <facility map> IAC SE
  230.  
  231.          subcommand code:  1
  232.  
  233.          This subcommand indicates the edit facilities the sender
  234.          supports.  The <facility map> parameter is one eight bit byte
  235.          containing the following flags:
  236.  
  237.              Bits 5-7        Reserved
  238.              Bit  4          Read Cursor
  239.              Bits 0-3        Reserved
  240.  
  241.          where:
  242.  
  243.              If the Read-Cursor bit is set, the sender supports the
  244.              READ-CURSOR and CURSOR-POSITION subcommands.
  245.  
  246.              Reserved bits represent edit facilities that are not
  247.              defined for DODIIS implementations;  therefore, no
  248.              descriptions are provided.  Reserved bits must be zeroed
  249.              to indicate non support of the associated edit facilities.
  250.  
  251.       IAC SB DET ERASE-FACILITIES <facility map> IAC SE
  252.  
  253.          subcommand code:  2
  254.  
  255.          This subcommand indicates the erase facilities the sender
  256.          supports.  The <facility map> parameter is one eight bit
  257.          byte containing flags.  Since no erase facilities are
  258.          defined for DODIIS implementations, no descriptions are
  259.          provided.  The ERASE-FACILITIES subcommand is part of the
  260.          minimal DET implementation and is included for that reason.
  261.          DODISI implementors must declare non support of erase
  262.          facilities by sending this subcommand with a zeroed facility
  263.          map.
  264.  
  265.       IAC SB DET TRANSMIT-FACILITIES <facility map> IAC SE
  266.  
  267.          subcommand code:  3
  268.  
  269.          This subcommand indicates the transmit facilities the sender
  270.          supports.  The <facility map> parameter is one eight bit byte
  271.          containing the following flags:
  272.  
  273.  
  274.  
  275.  
  276. Yasuda & Thompson                                               [Page 5]
  277.  
  278. RFC 1043              Data Entry Terminal - DODIIS         February 1988
  279.  
  280.  
  281.              Bits 6-7        Reserved
  282.              Bit  5          Data Transmit
  283.              Bits 0-4        Reserved
  284.  
  285.          where:
  286.  
  287.              If the Data-Transmit bit is set, the sender supports the
  288.              DATA-TRANSMIT subcommand.
  289.  
  290.              Reserved bits represent transmit facilities that are not
  291.              defined for DODIIS implementations; therefore, no
  292.              descriptions are provided.  Reserved bits must be zeroed
  293.              to indicate non support of the associated transmit
  294.              facilities.
  295.  
  296.       IAC SB DET FORMAT-FACILITIES <facility map> IAC SE
  297.  
  298.          subcommand code:  4
  299.  
  300.          This subcommand indicates the format facilities the sender
  301.          supports.  The <facility map> parameter is two eight bit bytes
  302.          containing the following:
  303.  
  304.              Byte 0
  305.                 Bit  7       Function Key
  306.                 Bit  6       Modified
  307.                 Bit  5       Field Selection
  308.                 Bit  4       Repeat
  309.                 Bit  3       Blinking
  310.                 Bit  2       Reverse Video
  311.                 Bit  1       Right Justification
  312.                 Bit  0       Reserved
  313.  
  314.              Byte 1
  315.                 Bit  7       Reserved for color
  316.                 Bit  6       Reserved
  317.                 Bit  5       Protection
  318.                 Bit  4       Alphabetic-Only
  319.                 Bit  3       Numeric-Only
  320.                 Bits 0-2     Intensity
  321.  
  322.              where:
  323.  
  324.                 If the Function-Key bit is set, the sender supports the
  325.                 FUNCTION-KEY and ENABLE-FUNCTION-KEY subcommands.
  326.  
  327.                 If the Modified bit is set, the sender supports the
  328.                 FORMAT-DATA subcommand's Modified attribute and the
  329.  
  330.  
  331.  
  332. Yasuda & Thompson                                               [Page 6]
  333.  
  334. RFC 1043              Data Entry Terminal - DODIIS         February 1988
  335.  
  336.  
  337.                 TRANSMIT-MODIFIED subcommand.
  338.  
  339.                 If the Field-Selection bit is set, the sender supports
  340.                 the FORMAT-DATA subcommand's Selectable attribute and
  341.                 the SELECTED-FIELD subcommand.
  342.  
  343.                 If the Repeat bit is set the sender supports the REPEAT
  344.                 subcommand.
  345.  
  346.                 If the Blinking bit is set, the sender requests or
  347.                 provides the ability to emphasize a string of characters
  348.                 by causing them to blink when displayed.  (See the
  349.                 FORMAT-DATA subcommand.)
  350.  
  351.                 If the Reverse-Video bit is set, the sender requests or
  352.                 provides the ability to emphasize a string of characters
  353.                 by "reversing their video image".  If characters are
  354.                 normally displayed as dark characters on a light
  355.                 background, they are reversed and displayed as light
  356.                 characters on a dark background, or
  357.                 vice versa.  (See the FORMAT-DATA subcommand.)
  358.  
  359.                 If the Right-Justification bit is set, the sender
  360.                 requests or provides the ability to cause data entered
  361.                 in a field to be right justified within the field.  (See
  362.                 the FORMAT-DATA subcommand.)
  363.  
  364.                 If the Protection bit is set, the sender requests or
  365.                 provides the ability to protect certain fields displayed
  366.                 on the DET screen from being altered by the user and
  367.                 supports the ERASE-UNPROTECTED, FIELD-SEPARATOR, and
  368.                 TRANSMIT-UNPROTECTED subcommands.  (See the FORMAT-DATA
  369.                 subcommand.)
  370.  
  371.                 If the Alphabetic-Only bit is set, the sender requests
  372.                 or provides the ability to constrain the user of the DET
  373.                 such that only alphabetic data may be entered into
  374.                 certain fields.  (See the FORMAT-DATA subcommand.)
  375.  
  376.                 If the Numeric-Only bit is set, the sender requests or
  377.                 provides the ability to constrain the user of the DET
  378.                 such that only numeric data may be entered into certain
  379.                 fields.  (See the FORMAT-DATA subcommand.)
  380.  
  381.                 The Intensity parameter is three bits wide and is
  382.                 interpreted as a positive binary integer indicating the
  383.                 number of visible levels of intensity that the sender
  384.                 requests or provides for displaying data.  (See the
  385.  
  386.  
  387.  
  388. Yasuda & Thompson                                               [Page 7]
  389.  
  390. RFC 1043              Data Entry Terminal - DODIIS         February 1988
  391.  
  392.  
  393.                 FORMAT-DATA subcommand.)
  394.  
  395.                 Reserved bits represent format facilities that are not
  396.                 defined for DODIIS implementations; therefore, no
  397.                 descriptions are provided.   Reserved bits must be
  398.                 zeroed to indicate non support of the associated format
  399.                 facilities.
  400.  
  401.    EDIT SUBCOMMANDS.  Edit subcommands are sent by the application to
  402.    position the cursor on the DET screen.
  403.  
  404.       IAC SB DET MOVE-CURSOR <x><y> IAC SE
  405.  
  406.          subcommand code:  5
  407.  
  408.          This subcommand positions the DET cursor at screen location
  409.          (x,y).  the <x> and <y> parameters are positive eight bit
  410.          binary integers representing the character and line positions,
  411.          respectively, of a DET screen location.  Values of x range
  412.          from zero (0) through M-1, where M is the DET screen width in
  413.          characters.  Values of y range from zero (0) through N-1,
  414.          where N is the DET screen length in lines.
  415.  
  416.       IAC SB DET HOME-CURSOR IAC SE
  417.  
  418.          subcommand code: 12
  419.  
  420.          This subcommand positions the cursor at DET screen address
  421.          (0,0).  It is equivalent to the MOVE-CURSOR subcommand, where
  422.          x=0 and y=0.
  423.  
  424.    TRANSMIT SUBCOMMANDS.  Transmit subcommands are sent by the
  425.    application to request data from the DET or by the terminal to
  426.    identify data returned from the DET.
  427.  
  428.       IAC SB DET READ-CURSOR IAC SE
  429.  
  430.          subcommand code: 17
  431.  
  432.          This subcommand requests return of the DET cursor position.
  433.          Use of this subcommand requires facility negotiation; see the
  434.          EDITFACILITIES subcommand, Read-Cursor bit.
  435.  
  436.       IAC SB DET CURSOR-POSITION <x><y> IAC SE
  437.  
  438.          subcommand code: 18
  439.  
  440.          This subcommand returns cursor position in response to a
  441.  
  442.  
  443.  
  444. Yasuda & Thompson                                               [Page 8]
  445.  
  446. RFC 1043              Data Entry Terminal - DODIIS         February 1988
  447.  
  448.  
  449.          READCURSOR subcommand.  The <x> and <y> parameters are
  450.          eight bit binary integers representing the cursor's position.
  451.          The <x> and <y> parameters are positive eight bit binary
  452.          integers representing the character and line positions,
  453.          respectively, of a DET screen location.  Values of x range
  454.          from zero (0) through M-1, where M is the DET screen width in
  455.          characters.  Values of y range from zero (0) through N-1,
  456.          where N is the DET screen length in lines.  Use of this
  457.          subcommand requires facility negotiation; see the
  458.          EDIT-FACILITIES subcommand, Read-Cursor bit.
  459.  
  460.       IAC SB DET TRANSMIT-SCREEN IAC SE
  461.  
  462.          subcommand code: 20
  463.  
  464.          This subcommand requests return of all characters on the DET
  465.          screen beginning at cursor position (0,0).  M x N characters,
  466.          where M is the DET screen width in characters and where N is
  467.          the DET screen length in lines, are returned with a SPACE
  468.          character returned for each character in the unwritten areas
  469.          (the areas between defined fields).  FIELD-SEPARATOR and
  470.          DATA-TRANSMIT subcommands are not required to delimit or
  471.          identify fields.
  472.  
  473.       IAC SB DET TRANSMIT-UNPROTECTED IAC SE
  474.  
  475.          subcommand code: 21
  476.  
  477.          This subcommand requests return of all characters in
  478.          unprotected fields.  Use of this subcommand requires facility
  479.          negotiation; see the FORMAT-FACILITIES subcommand, Protection
  480.          bit.
  481.  
  482.       IAC SB DET TRANSMIT-MODIFIED IAC SE
  483.  
  484.          subcommand code: 27
  485.  
  486.          This subcommand requests return of all characters in modified
  487.          fields.  Modified fields are fields that have the Modified
  488.          attribute set (see FORMAT-DATA subcommand) as well as fields
  489.          actually modified by the user.  Use of this subcommand
  490.          requires facility negotiation; see the FORMAT-FACILITIES
  491.          subcommand, Modified bit.
  492.  
  493.       IAC SB DET DATA-TRANSMIT <x><y> IAC SE
  494.  
  495.          subcommand code: 28
  496.  
  497.  
  498.  
  499.  
  500. Yasuda & Thompson                                               [Page 9]
  501.  
  502. RFC 1043              Data Entry Terminal - DODIIS         February 1988
  503.  
  504.  
  505.          This subcommand identifies a field returned in response to
  506.          a TRANSMIT-MODIFIED subcommand.  The <x> and <y> parameters
  507.          are positive eight bit binary integers indicating the cursor
  508.          position of the field that follows the DATA-TRANSMIT
  509.          subcommand.  This subcommand may precede the first field of
  510.          a transmission with subsequent fields separated by the
  511.          FIELD-SEPARATOR subcommand or it may precede each field.
  512.          Use of this subcommand requires facility negotiation; see
  513.          the TRANSMIT-FACILITIES subcommand, Data-Transmit bit.
  514.  
  515.    ERASE SUBCOMMANDS.  Erase subcommands are used by the application to
  516.    erase the DET screen or selected DET screen areas.  In performing
  517.    erase operations, the erased characters are replaced with SPACE
  518.    characters.
  519.  
  520.       IAC SB DET ERASE-SCREEN IAC SE
  521.  
  522.          subcommand code: 29
  523.  
  524.          This subcommand erases all characters from the DET screen.
  525.          All fields regardless of their attributes are deleted.  The
  526.          cursor position after the operation is at (0,0).  If the
  527.          protection attribute has been negotiated, the erased screen
  528.          contains protected SPACE characters.
  529.  
  530.       IAC SB DET ERASE-UNPROTECTED IAC SE
  531.  
  532.          subcommand code: 35
  533.  
  534.          This subcommand erases all characters in the unprotected fields
  535.          of the DET screen.  This subcommand replaces field contents
  536.          with SPACE characters; field attributes and sizes are not
  537.          changed.  The cursor position after the operation is at the
  538.          beginning of the first unprotected field or, if there is no
  539.          unprotected field, at (0,0).  Use of this subcommand requires
  540.          facility negotiation; see the FORMAT-FACILITIES subcommand,
  541.          Protection bit.
  542.  
  543.    FORMAT SUBCOMMANDS.  The format subcommands are used by the
  544.    application to define the fields of a form and by the terminal to
  545.    delimit fields sent from the DET.
  546.  
  547.       IAC SB DET FORMAT-DATA <format map><count> IAC SE
  548.  
  549.          subcommand code: 36
  550.  
  551.          This subcommand defines the attributes and size of a DET field.
  552.          The <format map> parameter defines the field attributes and the
  553.  
  554.  
  555.  
  556. Yasuda & Thompson                                              [Page 10]
  557.  
  558. RFC 1043              Data Entry Terminal - DODIIS         February 1988
  559.  
  560.  
  561.          <count> parameter defines the field size.  The field starts at
  562.          the position of the cursor when the subcommand is acted upon.
  563.          The next <count> data characters in the data stream fill the
  564.          field.
  565.  
  566.          The <format map> parameter is two eight bit bytes and contains
  567.          the following:
  568.  
  569.              Byte 0
  570.                 Bit  7             Blinking
  571.                 Bit  6             Reverse Video
  572.                 Bit  5             Right Justification
  573.                 Bits 3-4           Protection
  574.                 Bits 0-2           Intensity
  575.  
  576.              Byte 1
  577.                 Bits 5-7           Reserved
  578.                 Bits 2-4           Reserved for color
  579.                 Bit  1             Modified
  580.                 Bit  0             Selectable
  581.  
  582.              where:
  583.  
  584.                 If the Blinking bit is set, the following field of
  585.                  <count> characters should have the Blinking attribute
  586.                 applied to it by the receiver.
  587.  
  588.                 If the Reverse Video bit is set, the following field of
  589.                 <count> characters should be displayed by the receiver
  590.                 with video reversed.
  591.  
  592.                 If the Right Justification bit is set, characters
  593.                 entered into the field by the user should be right
  594.                 justified.
  595.  
  596.                 The Protection attribute is two bits wide and may take
  597.                 on the following values:
  598.  
  599.                   0  No protection.  Any valid DET data character may
  600.                      be entered in the field.
  601.  
  602.                   1  Protected.  No data may be entered in the field.
  603.  
  604.                   2  Alphabetic-only.  Only the alphabetic characters
  605.                      (A-Z and a-z) or the space character may be
  606.                      entered in the field.
  607.  
  608.                   3  Numeric-only.  Only the numeric characters (0-9),
  609.  
  610.  
  611.  
  612. Yasuda & Thompson                                              [Page 11]
  613.  
  614. RFC 1043              Data Entry Terminal - DODIIS         February 1988
  615.  
  616.  
  617.                      the plus sign (+), the minus sign (-), the decimal
  618.                      point (.) or the space character may be entered in
  619.                      the field.
  620.  
  621.                 The Intensity attribute is three bits wide and indicates
  622.                 the brightness to be used when displaying the characters
  623.                 in or entered into the field <count> characters wide.
  624.                 The available number of visible intensity levels should
  625.                 have been negotiated using the FORMAT-FACILITY
  626.                 subcommand. A value of zero (0) indicates that
  627.                 brightness should be OFF; that is, characters in or
  628.                 entered into the field should not be displayed.  The
  629.                 values 1-7 indicate relative brightness; the exact
  630.                 algorithm for mapping these values to the available
  631.                 levels of intensity is left to the implementors.
  632.  
  633.                 If the Modified bit is set, the field is considered to
  634.                 have been modified and will be returned, along with any
  635.                 user modified fields.
  636.  
  637.                 If the Selectable bit is set, the field is a candidate
  638.                 for field selection using the DET field selection
  639.                 device.
  640.  
  641.       The <count> parameter is two bytes and should be interpreted as a
  642.       positive 16-bit binary integer that defines the field size.  The
  643.       high order bit is transmitted first.  Data, not in the scope of
  644.       the count of a FORMAT-DATA subcommand, should be displayed with
  645.       the default field attributes (no blinking, no reverse video, no
  646.       justification, no protection, not modified, not selectable, and a
  647.       visible intensity).  Minimum field size is one (1) character.
  648.       Maximum field size is determined by a field's starting location
  649.       and the end of the screen or the start of the next field.
  650.  
  651.       Use of field attributes requires facility negotiation; see the
  652.       FORMAT-FACILITIES subcommand.
  653.  
  654.    IAC SB DET REPEAT <count><char> IAC SE
  655.  
  656.          subcommand code: 37
  657.  
  658.          This subcommand permits compression of DET data by encoding
  659.          strings of identical characters as the character and a repeat
  660.          count.  The <count> parameter is a positive 8-bit binary
  661.          integer.  The <char> parameter is a valid DET data character.
  662.          Use of this subcommand requires facility negotiation; see
  663.          the FORMAT-FACILITIES subcommand, Repeat bit.
  664.  
  665.  
  666.  
  667.  
  668. Yasuda & Thompson                                              [Page 12]
  669.  
  670. RFC 1043              Data Entry Terminal - DODIIS         February 1988
  671.  
  672.  
  673.       IAC SB DET FIELD-SEPARATOR IAC SE
  674.  
  675.          subcommand code: 39
  676.  
  677.          This subcommand separates fields returned by the DET in
  678.          response to TRANSMIT-MODIFIED or TRANSMIT-UNPROTECTED
  679.          subcommands.  Use of this subcommand requires facility
  680.          negotiation; see the FORMAT-FACILITIES subcommand,
  681.          Protection bit.
  682.  
  683. MISCELLANEOUS SUBCOMMANDS
  684.  
  685.       IAC SB DET FUNCTION-KEY <code> IAC SE
  686.  
  687.          subcommand code: 40
  688.  
  689.          This subcommand transmits a user entered function key code.
  690.          The <code> parameter is one byte that identifies the virtual
  691.          function key entered.  Function key <code> values range from
  692.          0 to 255.  This subcommand is used in conjunction with the
  693.          ENABLE-FUNCTION-KEY subcommand.  Use of this subcommand
  694.          requires facility negotiation; see the FORMAT-FACILITIES
  695.          subcommand, Function-Key bit.
  696.  
  697.       IAC SB DET ERROR <cmd><error code> IAC SE
  698.  
  699.          subcommand code: 41
  700.  
  701.          This subcommand allows a DET option implementation to report
  702.          errors it detects to the corresponding TELNET process.  The
  703.          <cmd> parameter is one byte containing the subcommand code
  704.          of the subcommand causing the error.  The <error code>
  705.          parameter is one byte containing a DET error code.  (See
  706.          Appendix 2 for DET error codes.)
  707.  
  708.          Errors should be reported when detected.  However, the
  709.          implementation should attempt to carry out the intent of
  710.          the subcommand or data in error.
  711.  
  712.       IAC SB DET START-OUT-OF-CONTEXT-DATA IAC SE
  713.  
  714.          subcommand code: 42
  715.  
  716.          This subcommand precedes out-of-context data.  The data
  717.          following this subcommand and prior to the
  718.          END-OUT-OF-CONTEXT-DATA subcommand is NOT part of the current
  719.          form.  The out-out-of-context data should be interpreted as
  720.          NVT mode data (i.e., it may contain carriage return and line
  721.  
  722.  
  723.  
  724. Yasuda & Thompson                                              [Page 13]
  725.  
  726. RFC 1043              Data Entry Terminal - DODIIS         February 1988
  727.  
  728.  
  729.          feed characters) and should be displayed in a timely and
  730.          non-destructive fashion.
  731.  
  732.       IAC SB DET END-OUT-OF-CONTEXT-DATA IAC SE
  733.  
  734.          subcommand code: 43
  735.  
  736.          This subcommand indicates the end of the out-of-context data.
  737.  
  738.       IAC SB DET ENABLE-FUNCTION-KEYS <key-map>IAC SE
  739.  
  740.          subcommand code: 44
  741.  
  742.          This subcommand enables (or disables) virtual function keys and
  743.          indicates the application's data requirements on function key
  744.          selection.  The <key-map> parameter is a variable length byte
  745.          string.  Each byte contains four bit-pairs and each bit-pair
  746.          represents a single function key.  The first byte represents
  747.          function keys zero (0) through three (3); the second byte,
  748.          function keys four (4) through seven (7); and so on.  Bit-pair
  749.          values and there meanings are as follows:
  750.  
  751.              0  The virtual function key is disabled (i.e., locked).
  752.  
  753.              1  The virtual function key is enabled.  Only the FUNCTION-
  754.                 KEY subcommand is returned on function key selection.
  755.  
  756.              2  The  virtual  function  key  is  enabled.  All requested
  757.                 screen data and/or cursor position, as well as, the
  758.                 FUNCTION-KEY subcommand are returned on function key
  759.                 selection.
  760.  
  761.              3  Undefined.
  762.  
  763.          Function keys not explicitly represented in the bitmap are
  764.          disabled (i.e., they are assumed to have a bit-pair value of
  765.          zero (0)).
  766.  
  767.          Use of this subcommand requires facility negotiation; see the
  768.          FORMAT-FACILITIES subcommand; Function-Key bit.
  769.  
  770.       IAC SB DET SELECTED-FIELD <x><y> IAC SE
  771.  
  772.          subcommand code: 45
  773.  
  774.          This subcommand identifies a user selected field.  The <x> and
  775.          <y> parameters are the cursor position of the character
  776.          selected from within a selectable field (see the FORMAT-DATA
  777.  
  778.  
  779.  
  780. Yasuda & Thompson                                              [Page 14]
  781.  
  782. RFC 1043              Data Entry Terminal - DODIIS         February 1988
  783.  
  784.  
  785.          subcommand, Selectable attribute.)  Use of this subcommand
  786.          requires negotiation; see the FORMAT-FACILITIES subcommand,
  787.          Field-Selection bit.
  788.  
  789. 3. Default and Minimal Implementation
  790.  
  791.  
  792.       Default.
  793.  
  794.          WONT DET -- DONT DET
  795.  
  796.          If the DET option cannot be negotiated, the connection is
  797.          not operated in DET mode.
  798.  
  799.       Minimal DET Implementation.
  800.  
  801.          The minimal DET implementation consists of all DET subcommands
  802.          that may be used without prior negotiation.  These subcommands
  803.          are as follows:
  804.  
  805.              EDIT-FACILITIES
  806.              ERASE-FACILITIES
  807.              TRANSMIT-FACILITIES
  808.              FORMAT-FACILITIES
  809.              MOVE-CURSOR
  810.              HOME-CURSOR
  811.              ERASE-SCREEN
  812.              TRANSMIT-SCREEN
  813.              FORMAT-DATA
  814.              ERROR
  815.              START-OUT-OF-CONTEXT-DATA
  816.              END-OUT-OF-CONTEXT-DATA
  817.  
  818.       DODIIS DET implementation requirements.
  819.  
  820.          The minimal DET implementation set of subcommands is not broad
  821.          enough to support forms interactions between DODIIS terminals
  822.          and DODIIS applications.  Therefore, DODIIS implementations of
  823.          the DET option must support additional DET subcommands.
  824.  
  825.          DODIIS terminal (User Host) implementations must implement and
  826.          support all of the DET subcommands contained in Section 2, as
  827.          well as those DET attributes supported by the terminal hardware
  828.          and any DET attributes easily emulated in software.  DODIIS
  829.          application (Server Host) implementations must implement and
  830.          support those DET subcommands and attributes required by its
  831.          applications.
  832.  
  833.  
  834.  
  835.  
  836. Yasuda & Thompson                                              [Page 15]
  837.  
  838. RFC 1043              Data Entry Terminal - DODIIS         February 1988
  839.  
  840.  
  841.          DODIIS implementation recommendations are contained in the
  842.          table that follows.  DODIIS implementors are cautioned that
  843.          failure to provide recommended support may limit
  844.          interoperability.
  845.  
  846.          Recommended DET support levels for DODIIS implementations
  847.  
  848.                                       USER HOST           SERVER HOST
  849.       DET SUBCOMMANDS                 SUPPORT LEVEL       SUPPORT LEVEL
  850.       ---------------                 -------------       -------------
  851.       EDIT-FACILITIES                 send & receive      send & receive
  852.       ERASE-FACILITIES                send & receive      send & receive
  853.       TRANSMIT-FACILITIES             send & receive      send & receive
  854.       FORMAT-FACILITIES               send & receive      send & receive
  855.       REPEAT                          send & receive      send & receive
  856.       ERROR                           send & receive      send & receive
  857.       MOVE-CURSOR                     receive only        send only
  858.       HOME-CURSOR                     receive only        send only
  859.       READ-CURSOR                     receive only        send only
  860.       TRANSMIT-SCREEN                 receive only        send only
  861.       TRANSMIT-UNPROTECTED            receive only        send only
  862.       TRANSMIT-MODIFIED               receive only        send only
  863.       ERASE-SCREEN                    receive only        send only
  864.       ERASE-UNPROTECTED               receive only        send only
  865.       FORMAT-DATA                     receive only        send only
  866.       START-OUT-OF-CONTEXT-DATA       receive only        send only
  867.       END-OUT-OF-CONTEXT-DATA         receive only        send only
  868.       ENABLE-FUNCTION-KEYS            receive only        send only
  869.       CURSOR-POSITION                 send only           receive only
  870.       DATA-TRANSMIT                   send only           receive only
  871.       FIELD-SEPARATOR                 send only           receive only
  872.       FUNCTION-KEY                    send only           receive only
  873.       SELECTED-FIELD                  send only           receive only
  874.  
  875.       DET ATTRIBUTES
  876.       --------------
  877.       Blinking                        (1)                 (2)
  878.       Reverse video                   (1)                 (2)
  879.       Right justification             (1)                 (2)
  880.       Protection                      required            (2)
  881.       Alphabetic-only protection      (1)                 (2)
  882.       Numeric-only protection         (1)                 (2)
  883.       Intensity level > 1             (1)                 (2)
  884.  
  885.       OTHER
  886.       -----
  887.       Page size (lines)               24-48
  888.       Line size (characters)          80
  889.  
  890.  
  891.  
  892. Yasuda & Thompson                                              [Page 16]
  893.  
  894. RFC 1043              Data Entry Terminal - DODIIS         February 1988
  895.  
  896.  
  897.       Function keys (number)          64
  898.  
  899.  
  900.          (1)   Implement if supported by terminal hardware.
  901.          (2)   Implement if required by the application.
  902.  
  903. 4.  Motivation for the option
  904.  
  905.    In 1981, the TELNET DET option (RFC 732) was selected as the protocol
  906.    to support interactions between DODIIS forms applications and DODIIS
  907.    forms terminals.  The intent was to foster a high degree of
  908.    interoperability between DODIIS hosts with forms applications and
  909.    terminals.  Since that time, the DET option has been and is being
  910.    implemented by several independent organizations within the DODIIS
  911.    community.
  912.  
  913.    Motivated by concern that the independently developed implementations
  914.    of the DET option may not interoperate with one another, DODIIS
  915.    implementors met to identify DODIIS implementation requirements and
  916.    to resolve implementation issues that affect interoperability.
  917.  
  918.    This document attempts to present the agreements and recommendations
  919.    of the DODIIS implementors.
  920.  
  921. 5.  Description and Implementation Rules
  922.  
  923.    The DODIIS DET model.
  924.  
  925.    The conceptual model of the DODIIS DET is that of a half-duplex,
  926.    forms oriented device with the following:
  927.  
  928.       a.  A rectangular screen for displaying protected and unprotected
  929.          data (a form) and optional capability to support blinking,
  930.          reverse video, and up to seven display intensity levels.
  931.  
  932.       b.  A keyboard and onboard mechanisms for editing unprotected
  933.          fields of a form and returning the modified fields.
  934.  
  935.       c.  Function keys that may be enabled and disabled on a key-by-key
  936.          basis by the application.
  937.  
  938.       d.  A field selection device, similar to a light pen, that permits
  939.          user selection of characters within appropriately identified
  940.          "selectable" fields.
  941.  
  942.    The DODIIS DET screen has default sizes of 80 characters and 24
  943.    lines.  These defaults may be changed through negotiation using the
  944.    Output Line Width and the Output Page Size options.  When the parties
  945.  
  946.  
  947.  
  948. Yasuda & Thompson                                              [Page 17]
  949.  
  950. RFC 1043              Data Entry Terminal - DODIIS         February 1988
  951.  
  952.  
  953.    cannot agree on screen size through negotiation, the default values
  954.    will be used.  By agreement, DODIIS terminal (User Host)
  955.    implementations of DET will support page sizes of 24 to 48 lines.
  956.  
  957.    The next writing position (x,y) on the DET screen is indicated by a
  958.    special display character called the cursor, where x is the position
  959.    of a character on a line and y is the line position on the DET
  960.    screen.  Values of x range from 0 (the left most character position
  961.    on the line) to M-1, where M is the line length.  Values of y range
  962.    from 0 (the top most line on the screen) to N-1, where N is the page
  963.    length.  The cursor may be moved to any position on the DET screen
  964.    without disturbing the characters already displayed.
  965.  
  966.    Valid field data for DET forms are the displayable ASCII character
  967.    codes in the range 32 through 126 decimal and character 7 "BELL".
  968.  
  969.    Negotiating the DET option
  970.  
  971.       The DET option is negotiated when either party REQUESTS use of the
  972.       DET option and the other party AGREES to its use.  The DET option
  973.       is requested by sending a DO DET and WILL DET and is accepted by
  974.       sending a WILL DET and DO DET.  (In the spirit of TELNET
  975.       negotiation, the DET option must be negotiated for both directions
  976.       on the connection.)
  977.  
  978.       Several TELNET options conflict with the DET option.  Therefore,
  979.       when the DET option is negotiated, the following TELNET options
  980.       should be refused (or explicitly terminated):  Echo, Suppress Go-
  981.       Ahead, and Binary.  (The Suppress Go-Ahead is the default state of
  982.       DODIIS TELNET connections when they are first established.)
  983.  
  984.    DET facilities negotiation
  985.  
  986.       All implementations of the DET option are required to support the
  987.       minimal DET implementation described in Section 3.  In addition,
  988.       DODIIS implementations are required to support subcommands and
  989.       attributes that are consistent with DODIIS implementation
  990.       requirements.  Before any of these additional DET facilities may
  991.       be used, an implementation must negotiate with its correspondent
  992.       for permission to use them.
  993.  
  994.       The four facility subcommands (EDIT-FACILITIES, ERASE-FACILITIES,
  995.       TRANSMIT-FACILITIES, and FORMAT-FACILITIES) are used to negotiate
  996.       DET subcommands and attributes.  This negotiation consists of an
  997.       exchange of facility subcommands and may be viewed as the terminal
  998.       (User Host) indicating the facilities it provides and the
  999.       application program (Server Host) indicating the facilities it
  1000.       desires.  The facilities that are jointly supported (and may be
  1001.  
  1002.  
  1003.  
  1004. Yasuda & Thompson                                              [Page 18]
  1005.  
  1006. RFC 1043              Data Entry Terminal - DODIIS         February 1988
  1007.  
  1008.  
  1009.       used) are arrived at by forming the logical intersection of the
  1010.       facility map that was sent with the facility map that was
  1011.       received.  (For the intensity attribute, the lesser of the number
  1012.       of intensity levels sent and the number of intensity levels
  1013.       received will be used.)  An implementation must record the
  1014.       currently agreed upon set of subcommands and attributes.  Only
  1015.       subcommands and attributes reflected in that set may be used
  1016.       without further exchange of facility subcommands.
  1017.  
  1018.       Either party or both parties may initiate facilities negotiation
  1019.       without confusion as long as care is taken to avoid non-
  1020.       terminating negotiation loops.  In particular, if you initiate
  1021.       negotiation by sending a facility subcommand, you must remember
  1022.       that you did initiate the negotiation.  On receipt of a facility
  1023.       subcommand; if you initiated the negotiation, no response is
  1024.       required and the negotiation is complete; if you did not initiate
  1025.       the negotiation, you must respond by sending the appropriate
  1026.       facility subcommand to the requester.  (Note that there is no
  1027.       requirement to negotiate facilities one class at a time and that
  1028.       the awareness of who initiated the negotiation must be maintained
  1029.       for each of the facility subcommands.)
  1030.  
  1031.       A TELNET implementation responding to a facility subcommand is not
  1032.       required to compute the logical intersection of the maps before
  1033.       responding.  It should respond as quickly as possible with a
  1034.       facility map indicating all facilities of that class that it
  1035.       supports.  There is no confusion since both parties compute the
  1036.       set of supported subcommands and attributes in the same fashion.
  1037.       Note that while both parties must agree to the use of the optional
  1038.       subcommands and attributes, either party may disable use at any
  1039.       time by merely sending the appropriate facility subcommand.
  1040.       Further, there are no restrictions on when facilities may be sent.
  1041.  
  1042.                                    CAUTION:
  1043.  
  1044.                  All facilities maps contain reserved bits.
  1045.                  These reserved bits must be zeroed when
  1046.                  facility maps are sent to indicate non
  1047.                  support and/or ignorance of the associated
  1048.                  facility.  The reserved bits may be defined
  1049.                  in the future.
  1050.  
  1051.    General DET Interaction
  1052.  
  1053.       In the general interaction, the application implementation
  1054.       constructs a form, negotiates the desired options, indicates the
  1055.       required responses, and sends the TELNET GO-AHEAD.  The GO-AHEAD
  1056.       signals that the form construction is complete and that the DET
  1057.  
  1058.  
  1059.  
  1060. Yasuda & Thompson                                              [Page 19]
  1061.  
  1062. RFC 1043              Data Entry Terminal - DODIIS         February 1988
  1063.  
  1064.  
  1065.       keyboard may be unlocked to permit a user response.
  1066.  
  1067.       The user normally responds by editing the unprotected areas of the
  1068.       form and signaling "form-complete", entering a function key,
  1069.       electing a field, or performing a combination of the preceding.
  1070.       In each case, the terminal implementation sends the DET
  1071.       subcommands indicating the user's response and returns the GO-
  1072.       AHEAD.  The GO-AHEAD signals the end of the user response.
  1073.  
  1074.       The form, as edited by the user, remains on the virtual screen so
  1075.       the application may continue the interaction by altering the form.
  1076.  
  1077.    Form construction
  1078.  
  1079.       The application implementation constructs a form on an erased
  1080.       screen by defining each of the fields in the form.  The DET fields
  1081.       are defined by their starting cursor position, size, attributes,
  1082.       and contents (data).
  1083.  
  1084.       A field's starting cursor position is the cursor position of the
  1085.       first character in the field.  The cursor may be positioned
  1086.       explicitly by the MOVE-CURSOR subcommand or it may be positioned
  1087.       implicitly by field data or other DET subcommands (e.g.,
  1088.       ERASESCREEN and ERASE-UNPROTECTED).
  1089.  
  1090.       Field size, attributes, and contents may be defined using the
  1091.       FORMAT-DATA subcommand followed by field data.  Alternatively, a
  1092.       field with default attributes may be defined using only the field
  1093.       data.  In this case, field size is the data string length.  The
  1094.       data string is terminated by the GO-AHEAD or any DET subcommand,
  1095.       except the REPEAT subcommand.
  1096.  
  1097.       There are no restrictions on attribute combinations that might be
  1098.       applied to a field even though some combinations may not be
  1099.       supported by terminal hardware.  The terminal implementation
  1100.       should display the field with a "reasonable" combination of
  1101.       attributes.  There is an error code that might be returned when an
  1102.       "unsupported combination of format attributes" is detected.  It is
  1103.       not clear what the application should do about the error.  In any
  1104.       event, this condition should not provoke session termination.
  1105.  
  1106.       Field contents (data) are restricted to printable ASCII characters
  1107.       and "BELL" (codes 32 through 126 and 7 decimal).  It is the
  1108.       responsibility of the application implementation to properly
  1109.       translate carriage returns, line feeds, tabs, etc.  to the
  1110.       appropriate DET subcommands.
  1111.  
  1112.       The maximum number of fields a screen might contain is the screen
  1113.  
  1114.  
  1115.  
  1116. Yasuda & Thompson                                              [Page 20]
  1117.  
  1118. RFC 1043              Data Entry Terminal - DODIIS         February 1988
  1119.  
  1120.  
  1121.       size in characters (the product of characters per line and lines
  1122.       per screen).
  1123.  
  1124.       Fields may not overlap.  That is, a new field may not start or end
  1125.       within a previously defined field.  However, overwriting of a
  1126.       field to change its attributes or contents is permitted.
  1127.  
  1128.       There are no restrictions on the order in which a form is built
  1129.       (e.g., left-to-right and top-to-bottom); the terminal
  1130.       implementation must be prepared to handle any order.  Terminal
  1131.       implementations are encouraged to display data as it arrives to
  1132.       accommodate applications that persist in displaying status updates
  1133.       on the task(s) they are performing.
  1134.  
  1135.       If an application elects to modify a user edited form, it must
  1136.       properly position the cursor making no assumptions about where the
  1137.       user might have left the cursor.  Further it must exactly
  1138.       overwrite the existing fields.
  1139.  
  1140.       When form construction is complete, the application indicates its
  1141.       response requirements by sending the appropriate transmit
  1142.       subcommand.  It may send TRANSMIT-SCREEN, TRANSMIT-UNPROTECTED, or
  1143.       TRANSMIT-MODIFIED to request data and/or it may send READ-CURSOR
  1144.       to request cursor position.  TRANSMIT-MODIFIED should be used
  1145.       whenever possible to minimize the volume of data transmitted
  1146.       between user and server hosts.
  1147.  
  1148.    Form response
  1149.  
  1150.       A form response is generated by the terminal implementation when
  1151.       the user signals "form-complete" or enters an enabled function
  1152.       key.  The data returned are determined by the application through
  1153.       the transmit subcommands.  If no transmit subcommand was sent the
  1154.       Modified and Protection attributes are used to determine an
  1155.       implied transmit subcommand.  If the Modified attribute has been
  1156.       negotiated, assume TRANSMIT-MODIFIED.  If the Protection attribute
  1157.       has been negotiated but the Modified has not, assume
  1158.       TRANSMITUNPROTECTED.  If neither has been negotiated, assume
  1159.       TRANSMITSCREEN.  (The intent is to achieve transmission efficiency
  1160.       by returning the smallest amount of data permitted by the in-force
  1161.       DET attributes.)
  1162.  
  1163.                                    CAUTION:
  1164.  
  1165.               With TRANSMIT-MODIFIED the terminal implementation
  1166.               must return all fields marked with the Modified
  1167.               attribute in addition to fields actually modified by
  1168.               the terminal user.
  1169.  
  1170.  
  1171.  
  1172. Yasuda & Thompson                                              [Page 21]
  1173.  
  1174. RFC 1043              Data Entry Terminal - DODIIS         February 1988
  1175.  
  1176.  
  1177.       Returned fields are identified and delimited using the
  1178.       DATATRANSMIT and/or FIELD-SEPARATOR subcommands.  The DATA-
  1179.       TRANSMIT subcommand indicates the cursor address of the field that
  1180.       follows it and there are no restrictions on the order in which
  1181.       fields are returned.  The FIELD-SEPARATOR subcommand conveys
  1182.       left-to-right and top-to-bottom field ordering.  Data not preceded
  1183.       by one of these subcommands is assumed to be the first unprotected
  1184.       field in the form.  A FIELD-SEPARATOR followed by FIELD-SEPARATOR
  1185.       indicates a field was unchanged and not returned.
  1186.  
  1187.       Unless otherwise restricted by Numeric-only or Alphabetic-only
  1188.       attributes, data entered into unprotected fields is restricted to
  1189.       the printable ASCII characters and "BELL" (codes 32 through 126
  1190.       and 7 decimal); no other characters are permitted.
  1191.  
  1192.    Function keys
  1193.  
  1194.       By general agreement, DODIIS terminal implementations will support
  1195.       64 function keys (key values 0 through 63).  Information on
  1196.       mapping function keys to application functions is the
  1197.       responsibility of the application and should be provided to the
  1198.       terminal user in the form of user documentation.
  1199.  
  1200.       The application enables and disables the function keys and
  1201.       indicates its form response requirements by sending the
  1202.       ENABLEFUNCTION-KEY subcommand.  The terminal implementation
  1203.       validates function key selections based on information received in
  1204.       the ENABLE-FUNCTION-KEY bitmap.  When an enabled function key is
  1205.       entered, the terminal returns a form response (if indicated in the
  1206.       bitmap), a FUNCTION-KEY subcommand, and the GO-AHEAD.
  1207.  
  1208.       Virtual function keys are part of the DET's virtual keyboard and
  1209.       are "locked" when the application has the GO-AHEAD.  Since the
  1210.       terminal sends the GO-AHEAD when a function key is entered,
  1211.       entering a function key "re-locks" all function keys until the
  1212.       GO-AHEAD is returned.
  1213.  
  1214.    Field selection
  1215.  
  1216.       Any character within a field having the Selectable attribute is a
  1217.       candidate for selection.  When selection is made, the terminal
  1218.       returns a SELECTED-FIELD subcommand identifying the character
  1219.       position selected.  Multiple selections are permitted; however,
  1220.       the ordering of the selections need not be preserved.  Field
  1221.       selection does not cause the GO-AHEAD to be sent.  The GO-AHEAD
  1222.       must be sent as a result of another user action such as a function
  1223.       key entry or "form-complete" indication.  Field selection is
  1224.       disabled when the application has the GO-AHEAD.
  1225.  
  1226.  
  1227.  
  1228. Yasuda & Thompson                                              [Page 22]
  1229.  
  1230. RFC 1043              Data Entry Terminal - DODIIS         February 1988
  1231.  
  1232.  
  1233.    Out-of-context data
  1234.  
  1235.       The out-of-context-data subcommands identify data that is clearly
  1236.       not in the context of the form interaction.  It is a convenient
  1237.       not in the mechanism for sending ARE-YOU-THERE responses or host
  1238.       advisory messages to the user without disturbing the DET's virtual
  1239.       screen or altering the context of the form interaction.
  1240.  
  1241.       The application may send out-of-context data at anytime.  The data
  1242.       must be preceded by the START-OUT-OF-CONTEXT-DATA subcommand and
  1243.       followed immediately by the END-OUT-OF-CONTEXT-DATA subcommand.
  1244.       The out-of-context data should contain carriage returns and line
  1245.       feeds to facilitate formatting.  The sender should limit the
  1246.       amount of data sent, since most terminal implementations must
  1247.       buffer the data prior to displaying it.  The terminal
  1248.       implementation should display the data to the user in a timely
  1249.       fashion.  The data is for display only, no user response is
  1250.       required, and there is no mechanism for user response.
  1251.  
  1252.    Line Discipline
  1253.  
  1254.       The subject of DET and line discipline (controlling the connection
  1255.       using the GO-AHEAD) causes a bit of confusion.  The following
  1256.       rules apply to GO-AHEAD and the DET option:
  1257.  
  1258.          When DET is negotiated, the application assumes the GO-AHEAD.
  1259.          GO-AHEAD is never passed implicitly; it is always passed
  1260.          explicitly.
  1261.  
  1262.          When the application has the GO-AHEAD, the terminal
  1263.          implementation may send TELNET commands (INTERRUPT-PROCESS,
  1264.          ABORT-OUTPUT, BREAK, and ARE-YOU-THERE).  Nothing else is
  1265.          valid.
  1266.  
  1267.          When the terminal has the GO-AHEAD, the application may send
  1268.          out-of-context data or MOVE-CURSOR and FORMAT-DATA subcommands
  1269.          to update protected fields.  Nothing else is valid.  (The
  1270.          terminal implementation must display the out-of-context data
  1271.          and the field updates as soon as convenient.)
  1272.  
  1273.          The terminal implementation sends the GO-AHEAD, without further
  1274.          action on the part of the terminal user, when an enabled
  1275.          function key or a "form-complete" is entered.
  1276.  
  1277.       Since the terminal user must take explicit action to return the
  1278.       GO-AHEAD to the application, instances will occur when the user
  1279.       has the GO-AHEAD but the application needs it to display a new
  1280.       form.  (This is most likely to occur when the user enters an
  1281.  
  1282.  
  1283.  
  1284. Yasuda & Thompson                                              [Page 23]
  1285.  
  1286. RFC 1043              Data Entry Terminal - DODIIS         February 1988
  1287.  
  1288.  
  1289.       INTERRUPT PROCESS.)  When it does occur, the application should
  1290.       send an out-of-context-context message requesting the user to
  1291.       enter a "form-complete".  If the user cooperates, the application
  1292.       can ignore any associated form response and regain control of the
  1293.       connection to display its form.
  1294.  
  1295.       The line discipline described here is more rigorous than that
  1296.       described for NVT in MIL-STD-1782.  These rules apply only when
  1297.       operating in DET mode.  At other times, the descriptions contained
  1298.       in MIL-STD-1782 apply.  This distinction is necessary to ensure
  1299.       interoperability with non-DET implementations of TELNET.
  1300.  
  1301.    Standard TELNET control functions
  1302.  
  1303.       The TELNET control functions, ERASE CHARACTER and ERASE LINE, are
  1304.       NOT required and should not be sent in DET mode.
  1305.  
  1306.    Other implementation notes
  1307.  
  1308.       a. The DODIIS DET conceptual model does not support character
  1309.          editors or basic scrolling applications.
  1310.  
  1311.       b. Implementors are cautioned that DET subcommand parameters
  1312.          (e.g., facilities maps) may take on the value of the IAC
  1313.          character and must be replicated if they are to be properly
  1314.          interpreted.
  1315.  
  1316.       c. Principle of Robustness:  "Be conservative in what you send; be
  1317.          liberal in what you accept from others."
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.  
  1328.  
  1329.  
  1330.  
  1331.  
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.  
  1340. Yasuda & Thompson                                              [Page 24]
  1341.  
  1342. RFC 1043              Data Entry Terminal - DODIIS         February 1988
  1343.  
  1344.  
  1345. APPENDIX 1 - DET OPCODES AND SUBCOMMAND SYNTAX.
  1346.  
  1347.              OPCODE    SUBCOMMAND SYNTAX
  1348.              ------    -----------------
  1349.  
  1350.               1     EDIT-FACILITIES <facility map>
  1351.               2     ERASE-FACILITIES <facility map>
  1352.               3     TRANSMIT-FACILITIES <facility map>
  1353.               4     FORMAT-FACILITIES <facility map 1><facility map 2>
  1354.               5     MOVE-CURSOR <x><y>
  1355.              12     HOME-CURSOR
  1356.              17     READ-CURSOR
  1357.              18     CURSOR-POSITION <x><y>
  1358.              20     TRANSMIT-SCREEN
  1359.              21     TRANSMIT-UNPROTECTED
  1360.              27     TRANSMIT-MODIFIED
  1361.              28     DATA-TRANSMIT <x><y>
  1362.              29     ERASE-SCREEN
  1363.              35     ERASE-UNPROTECTED
  1364.              36     FORMAT-DATA <format map><count>
  1365.              37     REPEAT <count><character>
  1366.              39     FIELD-SEPARATOR
  1367.              40     FUNCTION-KEY <code>
  1368.              41     ERROR <cmd><error code>
  1369.              42     START-OUT-OF-CONTEXT-DATA
  1370.              43     END-OUT-OF-CONTEXT-DATA
  1371.              44     ENABLE-FUNCTION-KEYS <key-map>
  1372.              45     SELECTED-FIELD <x><y>
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396. Yasuda & Thompson                                              [Page 25]
  1397.  
  1398. RFC 1043              Data Entry Terminal - DODIIS         February 1988
  1399.  
  1400.  
  1401. APPENDIX 2 - DET ERROR CODES
  1402.  
  1403.               1        Facility not previously negotiated.
  1404.  
  1405.               2        Illegal subcommand code.
  1406.  
  1407.               3        Cursor Address Out of Bounds.
  1408.  
  1409.               4        Undefined FUNCTION-KEY value.
  1410.  
  1411.               5        Can't negotiate acceptable line width.
  1412.  
  1413.               6        Can't negotiate acceptable page length.
  1414.  
  1415.               7        Illegal parameter in subcommand.
  1416.  
  1417.               8        Syntax error in parsing subcommand.
  1418.  
  1419.               9        Too many parameters in subcommand.
  1420.  
  1421.              10        Too few parameters in subcommand.
  1422.  
  1423.              11        Undefined parameter value.
  1424.  
  1425.              12        Unsupported combination of Format Attributes.
  1426.  
  1427.              13        Invalid field - overlap detected.
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452. Yasuda & Thompson                                              [Page 26]
  1453.  
  1454.